package editro.view 
{
	import editro.events.view.ChangePanelEvent;
	import editro.model.AntTargetVO;
	import editro.model.ATECacheModel;
	import editro.view.components.ViewComponentsLayer;
	import org.robotlegs.mvcs.Mediator;
	
	/**
	 * ...
	 * @author LEEF LEE_LEAF918@163.COM_QQ969442267
	 */
	public class ViewComponentsLayerMediator extends Mediator 
	{
		[Inject] 
		public var view:ViewComponentsLayer;
		[Inject] 
		public var cacheModel:ATECacheModel;
		
		override public function onRegister():void 
		{
			super.onRegister();
			view.init(cacheModel.stageInstance.stageWidth, cacheModel.stageInstance.stageHeight);
			eventMap.mapListener(eventDispatcher, ChangePanelEvent.SHOW_TASK_DETAIL,showVODetailsHandler);
		}
		
		private function showVODetailsHandler(e:ChangePanelEvent):void 
		{
			view.showTaskVOInfo(e.vo);
		}
	}

}